template "Master Boot Record"

// Sample template by Stefan Fleischmann

// To be applied to the very first sector of a physical hard disk.

description "First sector of a physical hard disk"
appliesto disk
requires 510 "55 AA"
multiple

begin
	read-only hex 446 "Master bootstrap loader code"

	numbering 1

	{
	section	"Partition ~"
	hex 1		"80 = active partition"
	uint8		"Start head"
	binary	"Start sector (bits 0-5)"
	binary	"Start track (bits 8,9 in bits 6,7 of sector)"
	uint8		"Operating system indicator (hex)"
	uint8		"End head"
	binary	"End sector (bits 0-5)"
	binary	"End track (bits 8,9 in bits 6,7 of sector)"
	uint32	"Sectors preceding partition ~"
	uint32	"Length of partition ~ in sectors"
	endsection
	} [4]

	read-only hex 2 "'55 AA' signature"

	// Now move the current position to the next
	// partition record, so that the user may browse
	// to see it using the ">" button. The distance
	// is (Sectors preceding partition 2 - 1) * 512.

	move[Sectors preceding partition 2] 512
	move -512
end